package com.gk.panda.apis.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dahuatech.icc.exception.ClientException;
import com.gk.panda.apis.Vo.RealtimeShootListVo;
import com.gk.panda.apis.dto.RealtimeShootFileDto;
import com.gk.panda.apis.dto.RealtimeShootListDto;
import com.gk.panda.apis.dto.RealtimeShootSaveDto;
import com.gk.panda.commons.result.Result;
import com.gk.panda.pojo.RealtimeShoot;

import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.List;

public interface RealtimeShootService extends IService<RealtimeShoot> {

    /**
     * 分页查询实时抓拍列表
     * @param dto
     * @return
     * @throws ClientException
     */
    Page<RealtimeShootListVo> getRealTimeShootPage(RealtimeShootListDto dto) throws ClientException;

    /**
     * 添加实时抓拍
     * @param dto
     * @return
     */
    boolean addRealTimeShoot(RealtimeShootSaveDto dto);

    /**
     * 拉取大华设备图片视频保存到实时抓拍
     */
    void saveIccVideoAndPic();

    /**
     * 实时抓拍归档
     * @param dto
     * @return
     * @throws UnsupportedEncodingException
     */
    int filePicAndVideo(RealtimeShootFileDto dto) throws UnsupportedEncodingException;

    /**
     * 根据实时抓拍id获取抓拍图片视频地址
     * @param id
     * @return
     */
    List<RealtimeShoot> getPicPathById(String id);

    /**
     * 根据id删除实时抓拍
     * @param id
     * @return
     */
    Result<String> delById(String id);

    /**
     * 挂起实时抓拍，暂不归档
     * @param realtimeShootIds
     */
    void withholdFile(String realtimeShootIds);

    /**
     * 保存陈博士抓拍图片视频数据
     */
    void saveChenVideoAndPic(String startTime, String endTime) throws ParseException;
}
